package cn.redcoral.messageplus.pathMapping;

import cn.messageplus.core.annotation.MessagePlusMapping;
import cn.messageplus.core.util.MpcUtil;
import cn.redcoral.messageplus.data.model.dto.GroupDto;
import cn.redcoral.messageplus.data.service.GroupService;
import org.springframework.beans.factory.annotation.Autowired;

@MessagePlusMapping("/mp/group")
public class GroupPathMapping {
    @Autowired
    private GroupService groupService;

    /**
     * 创建群组
     * @param groupDto 群组信息
     */
    @MessagePlusMapping("/create")
    public boolean createGroup(GroupDto groupDto) {
        return groupService.createGroup(MpcUtil.getUserId(), groupDto);
    }
}
